﻿using System;
using System.Data;
using System.Data.Common;
using Hxj.Data;
using Hxj.Data.Common;

namespace RecruitStudents.Utility.Model
{

    /// <summary>
    /// 实体类TB_Exam_Mac 。(属性说明自动提取数据库字段的描述信息)
    /// </summary>
    [Serializable]
    public class TB_Exam_Mac : Entity
    {
        public TB_Exam_Mac() : base("TB_Exam_Mac") { _MacID = Guid.NewGuid().ToString(); }

        #region Model
        private string _MacID;
        private string _ExamYear;
        private string _MacNO;
        private string _MachineName;
        private string _IsActive;
        private string _MachineType;
        private string _Remark;
        /// <summary>
        /// 主键ID
        /// </summary>
        public string MacID
        {
            get { return _MacID; }
            set
            {
                this.OnPropertyValueChange(_.MacID, _MacID, value);
                this._MacID = value;
            }
        }
        /// <summary>
        /// 考试年度
        /// </summary>
        public string ExamYear
        {
            get { return _ExamYear; }
            set
            {
                this.OnPropertyValueChange(_.ExamYear, _ExamYear, value);
                this._ExamYear = value;
            }
        }
        /// <summary>
        /// Mac编号
        /// </summary>
        public string MacNO
        {
            get { return _MacNO; }
            set
            {
                this.OnPropertyValueChange(_.MacNO, _MacNO, value);
                this._MacNO = value;
            }
        }
        /// <summary>
        /// 机器名称
        /// </summary>
        public string MachineName
        {
            get { return _MachineName; }
            set
            {
                this.OnPropertyValueChange(_.MachineName, _MachineName, value);
                this._MachineName = value;
            }
        }
        /// <summary>
        /// 是否有效
        /// </summary>
        public string IsActive
        {
            get { return _IsActive; }
            set
            {
                this.OnPropertyValueChange(_.IsActive, _IsActive, value);
                this._IsActive = value;
            }
        }
        /// <summary>
        /// 设备类型
        /// </summary>
        public string MachineType
        {
            get { return _MachineType; }
            set
            {
                this.OnPropertyValueChange(_.MachineType, _MachineType, value);
                this._MachineType = value;
            }
        }
        /// <summary>
        /// 备注
        /// </summary>
        public string Remark
        {
            get { return _Remark; }
            set
            {
                this.OnPropertyValueChange(_.Remark, _Remark, value);
                this._Remark = value;
            }
        }
        #endregion

        #region Method
        /// <summary>
        /// 获取实体中的主键列
        /// </summary>
        public override Field[] GetPrimaryKeyFields()
        {
            return new Field[] {
				_.MacID};
        }
        /// <summary>
        /// 获取列信息
        /// </summary>
        public override Field[] GetFields()
        {
            return new Field[] {
				_.MacID,
				_.ExamYear,
				_.MacNO,
				_.MachineName,
				_.IsActive,
				_.MachineType,
				_.Remark};
        }
        /// <summary>
        /// 获取值信息
        /// </summary>
        public override object[] GetValues()
        {
            return new object[] {
				this._MacID,
				this._ExamYear,
				this._MacNO,
				this._MachineName,
				this._IsActive,
				this._MachineType,
				this._Remark};
        }
        /// <summary>
        /// 给当前实体赋值
        /// </summary>
        public override void SetPropertyValues(IDataReader reader)
        {
            this._MacID = DataUtils.ConvertValue<string>(reader["MacID"]);
            this._ExamYear = DataUtils.ConvertValue<string>(reader["ExamYear"]);
            this._MacNO = DataUtils.ConvertValue<string>(reader["MacNO"]);
            this._MachineName = DataUtils.ConvertValue<string>(reader["MachineName"]);
            this._IsActive = DataUtils.ConvertValue<string>(reader["IsActive"]);
            this._MachineType = DataUtils.ConvertValue<string>(reader["MachineType"]);
            this._Remark = DataUtils.ConvertValue<string>(reader["Remark"]);
        }
        /// <summary>
        /// 给当前实体赋值
        /// </summary>
        public override void SetPropertyValues(DataRow row)
        {
            this._MacID = DataUtils.ConvertValue<string>(row["MacID"]);
            this._ExamYear = DataUtils.ConvertValue<string>(row["ExamYear"]);
            this._MacNO = DataUtils.ConvertValue<string>(row["MacNO"]);
            this._MachineName = DataUtils.ConvertValue<string>(row["MachineName"]);
            this._IsActive = DataUtils.ConvertValue<string>(row["IsActive"]);
            this._MachineType = DataUtils.ConvertValue<string>(row["MachineType"]);
            this._Remark = DataUtils.ConvertValue<string>(row["Remark"]);
        }
        #endregion

        #region _Field
        /// <summary>
        /// 字段信息
        /// </summary>
        public class _
        {
            /// <summary>
            /// * 
            /// </summary>
            public readonly static Field All = new Field("*", "TB_Exam_Mac");
            /// <summary>
            /// 主键ID
            /// </summary>
            public readonly static Field MacID = new Field("MacID", "TB_Exam_Mac", "主键ID");
            /// <summary>
            /// 考试年度
            /// </summary>
            public readonly static Field ExamYear = new Field("ExamYear", "TB_Exam_Mac", "考试年度");
            /// <summary>
            /// Mac编号
            /// </summary>
            public readonly static Field MacNO = new Field("MacNO", "TB_Exam_Mac", "Mac编号");
            /// <summary>
            /// 机器名称
            /// </summary>
            public readonly static Field MachineName = new Field("MachineName", "TB_Exam_Mac", "机器名称");
            /// <summary>
            /// 是否有效
            /// </summary>
            public readonly static Field IsActive = new Field("IsActive", "TB_Exam_Mac", "是否有效");
            /// <summary>
            /// 设备类型
            /// </summary>
            public readonly static Field MachineType = new Field("MachineType", "TB_Exam_Mac", "设备类型");
            /// <summary>
            /// 备注
            /// </summary>
            public readonly static Field Remark = new Field("Remark", "TB_Exam_Mac", "备注");
        }
        #endregion


    }
}

